/**
 * cs180 - Lab 02
 * Pythagoras Class
 * @author Fangning CHENG, <chengf@purdue.edu>
 */
import java.util.Scanner;

public class Pythagoras {
    public static void main(String[] argv) {
        Pythagoras p = new Pythagoras();
	Scanner scanner = new Scanner(System.in);
	System.out.println("Enter side 'a': ");
	int a = scanner.nextInt();
	System.out.println("Enter side 'b': ");
	int b = scanner.nextInt();

	double h;
	h = p.getHypotenuse(a,b);
	System.out.println("Hypotenuse: " + h);
    }

    public double getHypotenuse(int a, int b) {
        double h = Math.sqrt(a*a+b*b);
	return h;
    }
}
